package experiment;

import  java.util.*;

public  class  hehe{
    public  static  void  main(String[]  args)  {

        List<String>  list=new  ArrayList<String>();
        for(String  str:args)  {
            list.add(str);
        };

        for  (
                String str
                :
                args
        )  {
            System.out.println(str);
        }



        for(int  i=0;
            i < list.size()
                ;i++)
        {
            System.out.println(
                    list.get(i)
            );
        }

        //

        Iterator<String>  ite=
                list.iterator()
                ;
        while(
                ite.hasNext()
        )//判断下一个元素之后有值
        {
            System.out.println(ite.next());
        }
    }
}